import Vue from 'vue'
import Vuex from 'vuex'
import { createPersistedState, createSharedMutations } from 'vuex-electron'
// const packageJson = require('./../../package.json')
Vue.use(Vuex)

export default new Vuex.Store({
  plugins: [
    createPersistedState(),
    createSharedMutations()
  ],
  state: {
    user: {}
  },
  mutations: {
    SET_USER (state, payload) {
      state.user = payload
    }
  },
  actions: {
    setUser ({ commit }, values) {
      commit('SET_USER', values)
    }
  },
  modules: {
  }
})
